package com.co.server.dao.vote.impl;

import java.util.Collection;

import com.co.common.dao.BaseDaoImpl;
import com.co.common.exception.DaoException;
import com.co.server.dao.vote.TVoteLabelDao;
import com.co.server.entity.vote.TVoteLabel;

import org.springframework.stereotype.Repository;
import org.springframework.util.Assert;

@Repository
public class TVoteLabelDaoImpl extends BaseDaoImpl<TVoteLabel, Integer> implements TVoteLabelDao {

	private static final String SELECT_VOTEIDS_BY_VOTE_ID = "selectVoteIdsByVoteId";

	public Collection<Integer> selectVoteIdsByVoteId(Integer voteId) {
		Assert.notNull(voteId);
		try {
			return this.sqlSession.selectList(getSqlName(SELECT_VOTEIDS_BY_VOTE_ID), voteId);
		} catch (Exception e) {
			throw new DaoException(String.format("根据ID查询对象出错！语句：%s", getSqlName(SELECT_VOTEIDS_BY_VOTE_ID)), e);
		}
	}
	
	
	
}